ALMaSS  1.0
The Animal, Landscape and Man Simulation System
ALMaSS Documentation


The ODdox documentation [3] is a hybrid between the ODD protocol [1] for describing individual and agent based models and Doxygen an open source software tool designed to increase the accessibility of program code. In ODdox documentation provides a set of html documents generated by Doxygen whcih form cross-linked documentation of all classes, methods and variables used in a progam code. This allows the user to browse through classes and see the inter-relationships in the code. At the lowest level the code is presented together with a brief description of what it does, and including the comments placed inside the code itself. The ODdox thus provides a powerful way of documentating IBMs and allowing others to choose to see precisely what has been done or to get an overview quickly without the details.

Using ODdox documentation

This page provides a starting point for stepping off into the ALMaSS documentation by clicking any of the blue links. Here we provide an overview of what the system does in broad terms and a set of links to important system components each with their own ODDox description. Alternatively you can use the Classes tab to get a list of classes and step into the documentation from there.
ALMaSS was written in C++ code which is an object-oriented language. Objects (e.g. a male partridge) are termed 'instances' of a 'class' (e.g. Partridge_Male). Classes are arranged in a hierarchy whereby information contained in a base class is available to descendent classes. For an example see the class diagram at the top of TALMaSSObject. This diagram shows how TAnimal is descended from TALMaSSObject, and subsequently Partridge_Base is descended from TAnimal, and Partridge_Male from Partridge_Base. Understanding this basic concept and terminology will be an advantage when traversing through the code using the hyperlinks since methods (functions, behaviours) and attributes that are not modified in the descendent class need to be viewed in the base class. This method of programming reduces code size and eases code development. An example of this approach can be seen by comparing Hare_Juvenile::st_Dispersal with Hare_Female::st_Dispersal. In this case the female dispersal uses the juvenile code, then adds special female behaviour afterwards.
Please note that this set of documents is intended to document the ALMaSS system, but is a work in progress and not complete. Links are provided to parts of ALMaSS where currently documented but for further information see Bibliography.

Documentation following ODdox protocol



ALMaSS was constructed to be a highly flexible system of models for use in predicting the impact of man's management of the Danish landscape on a range of key animal species. It is typically used by constructing a baseline scenario and ome or more test scenarios, and then comparing predicted animal numbers and distribution between these. ALMaSS was designed with realism as a watchword, hence highly detailed management of farms is implemented together with the potential to use high resolution topographic maps (typically to 1m2) and climate data. However, this input is not obligatory and scenarios can be constructed using much more simple inputs such as geometric landscapes and simple or no mangement. Applications of ALMaSS have been in landscape ecology and population dynamics, applied pesticide research, and decision making at policy levels.

State variables and scales

ALMaSS is typically employed to simulate landscapes from 5x5km to 10x10km, although there is no practical limit to the size of landscapes simulated except for computer memory and CPU speed considerations.
State variables at the system level are the number and locations of the animals under study and the variables describing the state of the landscape. This latter set includes temperature, rainfall, windrun at the global scale; at the level of a single habitat patch, patch type (termed landscape element type), vegetation type, vegetation height, vegetation density, vegetation leaf area (green & dead), generalised insect abundance, and history of management events. Pesticide and other chemical residues are recorded at a finer scale than the habitat patch, typically in 4x4m areas. Typical state variables for each animal model will represent information both at the individual and population level, see Vole_Base for an example.

Process Overview and Scheduling

ALMaSS primarily runs on a daily time-step, although it is possible to create animal models with a shorter time step, the landscape management is fixed to the daily step. At the start of each day all landscape management events are simulated for the full day (see Farm) and the response of vegatation and generalised insect models is calculated. Subsequently any animal models are executed.
Animal models all use a common algorithm for carrying out population management each time-step. This algorithm uses a hierarchical approach to scheduling to overcome the problems of currency between interacting objects discussed by [2]. Although the computer is operating serially, the objects must be scheduled such that they appear to operate in parallel. For all ALMaSS animal models this is achieved using a state machine to move objects between behavioural states and by dividing the time-step into three sections, namely BeginStep, Step and EndStep. All objects execute their BeginStep code before any objects can execute Step code, and all must be finished with Step code before any can execute EndStep code.
Inside BeginStep, Step and EndStep, the order of execution of individuals can be controlled and be either random (default) or ordered e.g. w.r.t. their co-ordinates. The first case allows prevents the order of execution giving any one object an advantage in for example a competition situation, the second can be used as a way of optimizing code speed. Step code differs from BeginStep and EndStep in that it is repeatedly called until all animals indicate that they have finished with the Step code. This allows many linked behaviours to be carried out in this one step, often necessary to generate flexible responses to internally or externally generated events. The BeginStep/Step/EndStep structure allows for a very flexible combination of interlinked behaviours, and permits efficient use of resources e.g. by removing dead animals in the BeginStep before they waste CPU resources in Step. Handling of all scheduling via BeginStep/Step/EndStep is performed in the base class Population_Manager.


Design Concepts

This section uses the headings suggested by [1], where their rationale and definition is described. Note that the descriptions applied here describe the ALMaSS system at the system level, for individual level descriptions more akin to the aims of the original ODD protocol please refer to specific models selectable from the menu to the left.


Due to the potential complexity of any ALMaSS simulation of so many interacting agents and agent types there are a larger number of emergent properties, however in typical ALMaSS usage the primary emergent properties we are interested in are the number, distribution, and physiological state of the animals being modelled. These properties emerge in response to the interaction between the behavioural decisions of the animals as a result of the local information sensed from their surroundings. Details of these processes can be found in the animal model descriptions.


At the system level there is no adaptation, but individal animal models may implement this.


There is no measure of fitness at the system level, but animals may measure their fitness in reproductive success, longevity or physiological state.


There is prediction at the ALMaSS system level.


There is no sensing at the system level, however all animals are provided with sensing abilities depending upon the animals type and the detail to which it is modelled.


ALMaSS is designed primarily to be mechanistic, but stochasticity is built in when handling probabilities. Typically animal or management decisions result in a probabilistic assessment e.g 40% of farmers may spray insecticide in winter wheat, but if no information is present to determine which 40%, then this is determined probabalistically.


ALMaSS uses many collectives to group objects e.g. a number of fields as a farm, partridges in a covey, all voles as a vole population. These collectives are primarily used for code efficiency but some are used as the lowest level of precision e.g. a vole litter.


There are a number of standard outputs from ALMaSS available from the PopulationManager. There is also the potential to write specific data probes to collect data on individuals or populations as required, e.g. see Vole_Population_Manager::GeneticsResultsOutput.


Initialisation of ALMaSS is carried out using a text input file called TIALMaSSConfig.cfg. This contains a set of configuration variables that can be used to determine what landscape to use, the weather, type of management and provide parameter values for the animal models. A segment of this file is listed below:

# ------------------------------------------------------------------------------\n
# ------------------------------------------------------------------------------\n
# ------------------------------------------------------------------------------\n
# ------------------------------------------------------------------------------\n
MAP_WEATHER_FILE (string) = "foulum_cjt.pre" \n
MAP_CROPCURVES_FILE (string) = "curves.pre"\n
Standard landscape for use in CIPE:\n
MAP_MAP_FILE (string) = "Bje00_10x10_060712_HBFB25.lsb"\n
MAP_POLY_FILE (string) = "Bje00_10x10_060712_HBFB25_PolyRefs.txt"\n
MAP_FARMREF_FILE (string) = "Bje00_10x10_060712_HBFB25_FarmRefs.txt"\n
FARM_FIXED_CROP_TYPE (int) = 22 #1 Spring Barley, 4 Winter Wheat, 22 Winter Rye, 206 Oats
FARM_FIXED_CROP_ENABLE (bool) = false\n
# Combination for mono-crop: true, true/false, true/false, true/false,\n
# Combination for normal field rotation: false, true, false, false\n
# Combination for farm rotation: false, true, true, true\n
# Combination for landscape rotation: false, true, true, false\n
# ------------------------------------------------------------------------------\n
# ------------------------------------------------------------------------------\n
# ------------------------------------------------------------------------------\n
# ------------------------------------------------------------------------------\n


In order for ALMaSS to run it requires the following inputs:

  • A valid configuration file (see above), which will determine the parameter values for species models and landscape input files.
  • A landscape consisting of three files a map file (.lsb), a polygonreference file, and a farm reference file. Together these three files map and describe all the structural elements of the landscape and list the farms and farm types.
  • A file describing daily climate data.
  • A .ini file listing the species to run and the number of years to run.


ALMaSS consists of a many interlinked components, which as they are documented they will be appended here with short descriptions:

  • The Bembidion model - see ALMaSS Bembidion ODdox Documentation for a comprehensive description.
    The Bembidion model simulates a typical flightless carablid beetle, and is based upon Bembidion lampros. This model simulates movement, reproduction, mortality and developmental rates of beetle life-stages. It is highly dependent upon weather data inputs and management events.
  • The Hare model - see ALMaSS Hare ODdox Documentation for a comprehensive description. The hare model simulates the European Brown Hare (Lepus europaeus syn. L. carpensis).This model simulates movement, mortality, and reproductive behaviour for the hare and incorporates detailed energetic mechanisms (see ALMaSS brown hare Energetics) controlling growth, reproduction and mortality.
  • The Partridge model - see ALMaSS Partridge ODdox Documentation for a comprehensive description. The partridge model simulates the Grey Partridge (Perdix perdix). This model simulates movement, mortality, and reproductive behaviour for the partridge. The partridge model is unique among the ALMaSS models in having a collective, the Partridge_Covey which is often the primary entity being modelled.
  • The Vole model - see ALMaSS Vole and related classes ODdox Documentation for a comprehensive description. The vole model simulates a typical small mammal, and is based upon Microtus agrestis. This model simulates movement, territorial and reproductive behaviour for the vole in terms of male and female voles. It it optionally linked to a simulation of predators (TPredator_Population_Manager class and TPredator and descendent classes). The vole model also provides the potential for using population genetics via connections to GeneticMaterial.
  • The Skylark model - see ALMaSS Skylark ODdox Documentation for a comprehensive description. The skylark model simulates Alauda arvensis and was developed based primarily on Danish observational and experimental data. The skylark model interacts with the landscape via vegetation and insect biomass development, and is also influenced by farm management practices both directly and indirectly though altering vegetation or insect biomass.
  • The Goose model - see ALMaSS Goose Management ODdox Documentation for a comprehensive description.
  • The Hunters model - see Hunters ODdox Documentation for a comprehensive description.
  • The Rabbit model - see ALMaSS Rabbit ODdox Documentation for a comprehensive description.
  • The RoeDeer model - see ALMaSS RoeDeer ODdox Documentation for a comprehensive description.
  • The Newt model - see ALMaSS Newt ODdox Documentation for a comprehensive description.
  • The population manager - see Population_Manager - this class and its descendents control the population level internal management of all model animals. The population manager contains lists of all animals and is used for output and population level inputs e.g. catastrophes killing x% of the population.
  • The farm manager - see the Farm class. This class manages farm events via connections to models of crops based upon the class Crop and its descendents e.g. WinterWheat, and farm types e.g. ConventionalCattle. The farm class contains code causing simulated impacts for all farm practices modelled in ALMaSS.
  • Management plans for crops - see Crop class and descendents. This class' descendents simulate specific management required for each crop. Events triggered by these management plans are handled by the farm manager and are available for inspection by other objects, eg animal models in the system.
  • Modelling Rodenticide see The Rodenticide Model description following ODdox protocol for a comprehensive description.